package com.sixth.controller;

import com.sixth.service.LogMsgService;
import com.sixth.util.CommonResult;
import com.sixth.util.TableLayUi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: carrent
 * @description:
 * @author: 高振杨
 * @create: 2022-01-14 16:38
 **/
@RestController
@RequestMapping("log")
public class LogMsgController {

    @Autowired
    private LogMsgService logMsgService;
    @RequestMapping("/getallLogmsg")
    public TableLayUi getallLogmsg(int page, int limit, String loginname, String logintime){
        return logMsgService.getallLogmsg(page,limit,loginname,logintime);
    }

    //删除用户
    @RequestMapping("/deletelog")
    public CommonResult deletelog(Integer id){

        System.out.println(id);
        CommonResult del = logMsgService.deletelog(id);
        return del;
    }

    //批量删除
    @RequestMapping("dels")
    public CommonResult dels(String log){
        System.out.println(log);
        return logMsgService.batch(log);
    }
}
